import xadmin

# Create your models here.
from courses.models import CourseInfo, LessonInfo, VideoInfo, SourceInfo


class CourseInfoXadmin(object):
    list_display = ['image', 'name', 'study_num', 'level',
                    'love_num', 'click_num', 'category', 'add_time']
    model_icon = 'fa fa-book'


class LessonInfoXadmin(object):
    list_display = ['name', 'add_time', 'courseInfo']
    model_icon = 'fa fa-bookmark'


class VideoInfoXadmin(object):
    list_display = ['name', 'study_time', 'url', 'add_time', 'lessonInfo']
    model_icon = 'fa fa-video-camera'


class SourceInfoXadmin(object):
    list_display = ['name', 'down_load', 'add_time', 'courseInfo']
    model_icon = 'fa fa-folder'


xadmin.site.register(CourseInfo, CourseInfoXadmin)
xadmin.site.register(LessonInfo, LessonInfoXadmin)
xadmin.site.register(VideoInfo, VideoInfoXadmin)
xadmin.site.register(SourceInfo, SourceInfoXadmin)
